﻿<?xml version="1.0" encoding="utf-8"?><Articles><Article><ArticlesID>529</ArticlesID><Title>Tạo thẻ div cố định ở Bottom</Title><Body>&amp;lt;p&amp;gt;Tạo 1 file Style.css với 1 class l&amp;amp;agrave; .divOnTop như sau:&amp;lt;/p&amp;gt;
&amp;lt;pre class=&amp;quot;brush: css;&amp;quot; title=&amp;quot;code&amp;quot;&amp;gt;
.divOnTop
{
	color:#FFFFFF;
	left:0px;
	height:26px;
	width:100%;
	background-color:Blue;
	/* Text Always Center */
	line-height:26px;
	/* position on bottom */
	bottom: 0px;
        /* Thay: bottom: 0px; = top: 0px; neu muon o tren dau trang */
	position: fixed;
	z-index: 100;
	/* transparent background */
	opacity:.75;
	filter: alpha(opacity=75); 
	-moz-opacity: 0.75;	
}&amp;lt;/pre&amp;gt;
&amp;lt;p&amp;gt;trong trang chủ (trong thẻ body nh&amp;amp;eacute;)&amp;lt;/p&amp;gt;
&amp;lt;pre class=&amp;quot;brush: xhtml;&amp;quot; title=&amp;quot;code&amp;quot;&amp;gt;
&amp;amp;lt;div class=&amp;amp;quot;divOnTop&amp;amp;quot;&amp;amp;gt;T&amp;amp;eacute;est&amp;amp;lt;/div&amp;amp;gt;&amp;lt;/pre&amp;gt;
&amp;lt;p&amp;gt;hehe chạy kh&amp;amp;aacute; ổn ro&amp;amp;agrave;i, nhưng vấn đề đ&amp;amp;atilde; nảy sinh l&amp;amp;agrave; IE7,Firefox chạy ok but IE6 die &amp;lt;img border=&amp;quot;0&amp;quot; class=&amp;quot;inlineimg&amp;quot; title=&amp;quot;Smilie&amp;quot; alt=&amp;quot;&amp;quot; src=&amp;quot;http://www.ddth.com/images/smilies/smile.gif&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;
bởi v&amp;amp;igrave; IE6 kh&amp;amp;ocirc;ng hiểu thuộc t&amp;amp;iacute;nh &amp;lt;b&amp;gt;position: fixed;&amp;lt;/b&amp;gt; của CSS&amp;lt;br /&amp;gt;
ch&amp;amp;uacute;ng ta sẽ fix bằng file javascript tải ở đ&amp;amp;acirc;y&amp;lt;br /&amp;gt;
&amp;lt;a target=&amp;quot;_blank&amp;quot; href=&amp;quot;http://www.doxdesk.com/file/software/js/fixed.js&amp;quot;&amp;gt;http://www.doxdesk.com/file/software/js/fixed.js&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;
sau đ&amp;amp;oacute; v&amp;amp;ocirc; trang chủ trong thẻ &amp;amp;lt;head&amp;amp;gt; nh&amp;amp;eacute;&amp;lt;/p&amp;gt;
&amp;lt;pre title=&amp;quot;code&amp;quot; class=&amp;quot;brush: xhtml;&amp;quot;&amp;gt;
&amp;amp;lt;!--[if lt IE 7]&amp;amp;gt;&amp;amp;lt;script language=&amp;amp;quot;javascript&amp;amp;quot; type=&amp;amp;quot;text/javascript&amp;amp;quot; src=&amp;amp;quot;fixed.js&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;&amp;amp;lt;![endif]--&amp;amp;gt;&amp;lt;/pre&amp;gt;
&amp;lt;p&amp;gt;ok giờ đ&amp;amp;atilde; chạy được tr&amp;amp;ecirc;n mọi tr&amp;amp;igrave;nh duyệt.&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Demo: &amp;lt;a target=&amp;quot;_blank&amp;quot; href=&amp;quot;http://demo.meotom.net/TextOnBottom.htm&amp;quot;&amp;gt;http://demo.meotom.net/TextOnBottom.htm&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;</Body><CommentEnabled>True</CommentEnabled><ViewCount>0</ViewCount><ReleaseDate>10/15/2009 9:30:47 PM</ReleaseDate><TotalComment>0</TotalComment><IsMedia>False</IsMedia><IsPicture>False</IsPicture><IsVote>True</IsVote><ArticlePassword /><PostVisible>0</PostVisible><ArticlePath>/2009/10/15/Tao-the-div-co-dinh-o-Bottom-211</ArticlePath><Approved>True</Approved><ImagePath /><CategoryId>29</CategoryId><ArrayCatID>29|25</ArrayCatID></Article></Articles>